/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

// Shared between:
// - compiler-course_settings.scss
// - compiler-assignments.scss
// - compiler-grading_standards.sass
// must have @import base/environment loaded within compiler for this to work

#standards {
  .grading_standard {
    border-bottom: 1px dotted #ccc;
    margin-bottom: 25px;
    .links {
      opacity: 0.5;
    }
    &:hover {
      .links {
        opacity: 1;
      }
    }
    .standard_title {
      font-weight: bold;
      font-size: 1.2em;
    }
  }
  &.react_grading_standards {
    .cancel_button {
      margin-right: 6px;
    }
  }
}

.grading_standard {
  .read_only {
    display: none;
  }
  .editing_box {
    display: none;
  }
  .editing_td {
    display: none;
  }
  .editing_tr {
    display: none;
  }
  .min_score, .max_score {
    width: 100px;
  }
  &.editing {
    .displaying {
      display: none;
    }
    .editing_box {
      display: block;
    }
    td.editing_box {
      display: table-cell;
    }
    tr.editing_box {
      display: table-row;
    }
    .standard_title div {
      float: left;
    }
  }
  &.react_grading_standard {
    .alert-message:focus {
      outline: none;
    }
    .grading_standard_title {
      width: 175px;
    }
    .name_header {
      text-align: left;
      padding-right: 10px;
      width: 24%;
    }
    .insert_row_container {
      padding: 2px 5px;
      width: 4%;
    }
    .links {
      float: right;
    }
    .disabled-buttons {
      float: right;
      opacity: 0.5;
    }
    .cannot-manage-notification {
      font-weight: normal;
      margin-left: 4px;
    }
    .icon-edit {
      margin-right: 5px;
    }
    .form-actions {
      background-color: transparent;
      margin-bottom: 0px;
      padding-bottom: 0px;
    }
    .range_container {
      width: 72%;
      .range_label {
        float: left;
        margin-left: 10px;
      }
    }
    table {
      width: 100%;
      &.grading_standard_data {
        margin-bottom: 20px;
      }
    }
  }
}

.grading_standard_row {
  &.react_grading_standard_row {
    input {
      margin-top: 5px;
      margin-bottom: 5px;
    }
    .insert_row_icon_container {
      padding: 2px 2px;
      width: 4%;
    }
    .row_name_container {
      width: 24%;
    }
    .standard_name {
      width: 100px;
    }
    .standard_value {
      width: 37px;
    }
    .last_row_cell {
      padding-left: 15px;
    }
    .row_cell {
      padding: 2px 2px;
      width: 24%;
      .range_to {
        padding-right: 5px;
      }
    }
    &.border_below {
      border-bottom: dashed;
      border-bottom-width: 2px;
      border-bottom-color: #999;
    }
  }
}
